@import '../../components/explanation/explanation-card/ExplanationCard.scss';


.news-item {
    position: relative;
    box-sizing: border-box;
    width: 100%;

    margin: 0 auto;
    cursor: pointer;

    &__reactions {
        width: 87px;
        height: 24px;
        position: absolute;
        right: 0;
        bottom: 16px;
        display: flex;
        z-index: 1;

        @media screen and (min-width: 700px) {
            right: 24px;
            bottom: 24px;
        }
    }

    &__reaction {
        display: flex;
        font-size: 12px;
        line-height: 18px;

        &:first-child {
            padding-right: 16px;
        }

        &-icon {
            display: flex;
            padding-right: 4px;
            cursor: pointer;

            svg {
                width: 100%;
                max-width: 18px;
                height: 100%;
                max-height: 18px;
                stroke: #002F6C;
            }

            // &_selected svg {
            //     stroke: none;
            // }

            &_like.news-item__reaction-icon_selected svg {
                // fill: #00635B;
            }

            &_dislike.news-item__reaction-icon_selected svg {
                // fill: #FF0000;
            }
        }
    }

    &__text-item {
        @include explanation-card-tags();

        p {
            padding: 0;
        }

        sup {
            vertical-align: super;
            font-size: smaller;
        }

        sub {
            vertical-align: sub;
            font-size: smaller;
        }

        code {
            font-family: monospace;
        }
    }

    &__link {
        text-decoration: none;
    }

    &__content {
        box-sizing: border-box;

        padding: 8px 8px 19px 8px;

        text-align: left;

        background-color: #fff;

        @media screen and (min-width: 700px) {
            padding: 16px 16px 27px 16px;
        }

        & a {
            display: block;
            color: #3367B3;
            margin: 8px 0;

            &::before {
                content: '';
                background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.35 10.45L3.8 15L1 12.2L5.55 7.65L6.95 9.05M9.05 6.95L7.65 5.55L12.2 1L15 3.8L10.45 8.35L9.05 6.95ZM9.05 6.95L6.95 9.05M9.05 6.95L10.45 5.55M6.95 9.05L5.55 10.45' stroke='%233367B3'/%3E%3C/svg%3E");
                width: 14px;
                display: inline-block;
                height: 14px;
                background-repeat: no-repeat;
                background-position: bottom;
                padding-right: 8px;
                background-size: contain;
            }
        }
    }

    &__date {
        font-size: 12px;
        line-height: 16px;
        text-align: left;
        color: #909090;
        margin-top: 11px;
        padding: 0 8px;
    }

    &__pin {
        display: flex;
        justify-content: flex-end;
        margin: 8px 8px;
        @media screen and (min-width: 700px) {
            padding: 0 8px 8px;
        }

        & svg {
            fill: red;
        }
    }

    &__header {
        display: flex;
        margin: 8px 0;
        font-size: 16px;
        font-weight: 600;
        line-height: 22px;
        text-align: left;
        color: #111111;
        padding: 0 8px;
    }

    &__news-description {
        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
        text-align: left;
        color: #111111;
        height: fit-content;
        max-height: 120px;
        overflow-y: hidden;
        position: relative;
        margin-bottom: 10px;
        padding: 0 8px;
        margin-top: 16px;

        img {
            display: none;
        }

        &_with-media {
            max-height: 190px;
            margin-top: 16px;
            padding: 0 0;
            &_video{
                margin: 0 8px;
            }
            @media screen and (min-width: 700px) {
                max-height: 280px;
            }
        }

        &_with-media .news-item__video-item {
            display: block;
            height: 184px;
            width: 100%;
            cursor: pointer;
            background-repeat: no-repeat;
            background-position: center center;
            background-size: cover;
            touch-action: auto;
        }

        &_with-media img {
            display: block;
            height: auto;
            width: 100%;
            cursor: pointer;
            touch-action: auto;
            margin: 0 auto;
        }
        &_with-media p {
            display: block;
            max-height: 184px;
        }
    }

    &__news-description_overlay {
        height: 30px;
        position: absolute;
        left: 0;
        bottom: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 63.54%);
        backdrop-filter: blur(0.3px);
        width: 100%;

        &_hidden {
            display: none;
        }
    }

    &__show-more {
        font-size: 14px;
        font-weight: 400;
        line-height: 20px;
        text-align: left;
        color: #002F6C;
        padding: 0 8px;
        margin-top: 8px;
    }

    &__video-item {
        display: none;
    }

    &__image-item {
        display: none;
    }
}
